<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Student list</title>
</head>
<body>
<form action="/klass/list" method="post">
    <label>Name</label>
    <input type="text" name="name">
    <label>Age</label>
    <input type="text" name="major">
    <input type="submit" value="Search">
</form>
<table border="1">
    <tr>
        <td>id</td>
        <td>Name</td>
        <td>Major</td>
        <td>Action</td>
    </tr>
    <tr th:each="klass: ${klasss}">
        <td th:text="${klass.id}"></td>
        <td th:text="${klass.name}"></td>
        <td th:text="${klass.major}"></td>
        <td>
            <a th:href="@{/klass/delete/{id}(id=${klass.id})}">
                Delete
            </a>
            <a th:href="@{/klass/update/{id}(id=${klass.id})}">
                Update
            </a>
        </td>
    </tr>
</table>
<div>
    <a href="/klass/create">Create</a>
</div>
</body>
</html>